package org.noranj.service;

import java.util.List;

import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.noranj.dao.ConversationDAO;
import org.noranj.dto.ConversationDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sun.xml.txw2.annotation.XmlElement;


@Service
public class ConversationManagerImpl implements ConversationManager {

  
  @Autowired
  private ConversationDAO conversationDAO;

  
  
 
  @Transactional
  public void insertConversation(ConversationDTO conversation) {
    conversationDAO.insertConversation(conversation);
  }
    
  @Transactional
  public ConversationDTO getConversation(int userId) {
    return conversationDAO.getConversation(userId);
  }
  

  @Transactional
  public List<ConversationDTO> getConversations() {
    return conversationDAO.getConversations();
  }

}
